<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

    class Home extends MX_Controller {

        private $data;

        function __construct()
        {

            parent::__construct();
            if(!$this->session->userdata('logged_in')){
                redirect(base_url());    
            }
            $this->load->config('pages');

        }

        public function index()
        {

            $this->data['page'] = 'Home';
            $this->data['title'] = 'Welcome';
            $this->template->build('home/home',$this->data); 
        }

        public function my_language(){
            $this->session->set_userdata('my_language', $_POST['my_language']);
            echo json_encode(TRUE);
        }
    }

    /* End of file home.php */
    /* Location: ./application/controllers/home.php */